package 设计模式.责任链模式.管理人员;

/**
 * @description:
 * @author: 小白白
 * @create: 2021-10-10
 **/

public class AdminAuth extends OAAuth {

    private String userName;

    public AdminAuth(String roleName, String userName) {
        super(roleName);
        this.userName = userName;
    }

    @Override
    public void doAuth() {
        System.out.println(userName + "通过审批");
        if (getNextAuth() != null) {
            System.out.println("即将进入下一级:" + getNextAuth().roleName);
            getNextAuth().doAuth();
        } else {
            System.out.println("审批流程完成");
        }
    }

}
